﻿<%@ Page Language="C#"  MasterPageFile="Site.master" AutoEventWireup="true" CodeBehind="item_else.aspx.cs" Inherits="GeniusWebApplication.item_else" %>

<asp:Content ID="_css_place" ContentPlaceHolderID="css_place" runat="server">
    <link href="./css/item.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src=""></script>
	<script type="text/javascript" src="js_lib/jquery.min.js"></script>
    <script type="text/javascript" src="js_lib/flexpaper_flash.js"></script>
    <script type="text/javascript" src="js_lib/flexpaper_flash_debug.js"></script>
    
</asp:Content>

<asp:Content ID="_upload" ContentPlaceHolderID="upload" runat="server">
   
</asp:Content>
	
<asp:Content ID="_library" ContentPlaceHolderID="library" runat="server" >
    <div id="decs"><br/><br/><br/><br/>
	<h1><%=resourceName%></h1>
    <br/>
    <div id="describ">
        <p id="desCon" runat="server"></p><br/>
        <p id="guanjianKey" runat="server"></p>
    </div>
    </div>
</asp:Content>

<asp:Content ID="_you_shang_jiao" ContentPlaceHolderID="you_shang_jiao" runat="server" >
	<input type="search" placeholder="搜索资源"  results="8" id="searchBox" name="searchBox">
    <select id="searchType">
        <option value="0">普通搜索</option>
        <option value="1">高级搜索</option>
    </select>
	<span class="headerItem"><a href="#" onclick="searchResource();">搜索</a></span>
	<span class="headerItem" id="message_notice">消息</span>
	<span class="headerItem"><a href="./log.aspx">退出</a></span>
</asp:Content>

<asp:Content ID="_float_left" ContentPlaceHolderID="float_left" runat="server" >
    <section id="myList">
		
			<br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
			<div id="comments">
				<p>评论：</p>
				<textarea name="txt_desc" id="txt_desc" cols="94" rows="6"></textarea>
				<br/>
                <input type="button" id="comm_btn" value="提交" onclick="clickBuntton();"/>
                <div id="comm_con_1" runat="server" >
                </div>
                <div id="comm_con" >
                </div>
				
                <script>
                    function clickBuntton() {
                        var comm = $("#txt_desc").val();

                        if (comm == "") {
                            alert("评论不能为空！");
                        }

                        else if (comm.length > 200) {
                            alert("评论过长！");
                        }
                        else {
                            $.ajax({
                                type: "POST",
                                url: "item_else.aspx/ajaxSaveComment",
                                data: "{comment:'" + comm + "'}",
                                contentType: "application/json; charset=utf-8",
                                success: function (data) {

                                    var info = eval("(" + data.d + ")");
                                    var suc = info.result;
                                    var msg = info.message;
                                    if (suc == 1) {

                                        alert("评论成功！");
                                        var dateTime = new Date();
                                        var yy = dateTime.getFullYear();
                                        var MM = dateTime.getMonth() + 1;  //因为1月这个方法返回为0，所以加1
                                        var dd = dateTime.getDate();
                                        var time_my = yy + "年" + MM + "月" + dd + "日 ";
                                        $("#comm_con").append("<div class='comm_list'><p class='comm_user'><%=userName %>:" + comm + "</p><div class='comm_date'>" + time_my + "</div></div>");
                                    } else {
                                        alert("登陆失败：" + msg);
                                    }
                                }
                            });
                        }
                    }
                </script>
			</div>
			
	</section>
</asp:Content>

<asp:Content ID="_float_right" ContentPlaceHolderID="float_right" runat="server" >
    <div id="right_content">
       <div id="doc">
	        <div id="xinxi">文档信息</div>
	        <div id="con">
		        <div id="mark">
			        您的评分：<img src="./img/opt_star.png" class="stars" onclick="ckickStar(this);" id="s1"><img  id="s2" onclick="ckickStar(this);" class="stars"  src="./img/opt_star.png" ><img id="s3" onclick="ckickStar(this);" class="stars" src="./img/opt_star.png" ><img id="s4" class="stars" onclick="ckickStar(this);" src="./img/opt_star.png" id="s4"><img onclick="ckickStar(this);" class="stars" src="./img/opt_star.png" id="s5">
		            <script>
		                var asd = 0;
		                function ckickStar(b) {
		                    if (asd == 0) {
		                        asd = 1;
		                        var s1 = document.getElementById("s1");
		                        var s2 = document.getElementById("s2");
		                        var s3 = document.getElementById("s3");
		                        var s4 = document.getElementById("s4");
		                        var s5 = document.getElementById("s5");
		                        var mark = 0;
		                        if (b == s1) {
		                            s1.src = "./img/opt_fab.png";
		                            s2.src = "./img/opt_star.png";
		                            s3.src = "./img/opt_star.png";
		                            s4.src = "./img/opt_star.png";
		                            s5.src = "./img/opt_star.png";
		                            mark = 1;
		                        }
		                        else if (b == s2) {
		                            s2.src = "./img/opt_fab.png";
		                            s1.src = "./img/opt_fab.png";
		                            s3.src = "./img/opt_star.png";
		                            s4.src = "./img/opt_star.png";
		                            s5.src = "./img/opt_star.png";
		                            mark = 2;
		                        }
		                        else if (b == s3) {
		                            s3.src = "./img/opt_fab.png";
		                            s2.src = "./img/opt_fab.png";
		                            s1.src = "./img/opt_fab.png";
		                            s4.src = "./img/opt_star.png";
		                            s5.src = "./img/opt_star.png";
		                            mark = 3;
		                        }
		                        else if (b == s4) {
		                            s4.src = "./img/opt_fab.png";
		                            s3.src = "./img/opt_fab.png";
		                            s2.src = "./img/opt_fab.png";
		                            s1.src = "./img/opt_fab.png";
		                            s5.src = "./img/opt_star.png";
		                            mark = 4;
		                        }
		                        else if (b == s5) {
		                            s5.src = "./img/opt_fab.png";
		                            s4.src = "./img/opt_fab.png";
		                            s3.src = "./img/opt_fab.png";
		                            s2.src = "./img/opt_fab.png";
		                            s1.src = "./img/opt_fab.png";
		                            mark = 5;
		                        }
		                        $.ajax({
		                            type: "POST",
		                            url: "item_else.aspx/ajaxSaveMark",
		                            data: "{mark:'" + mark + "'}",
		                            contentType: "application/json; charset=utf-8",
		                            success: function (data) {

		                                var info = eval("(" + data.d + ")");
		                                var suc = info.result;
		                                var msg = info.message;
		                                if (suc == 1) {


		                                } else {
		                                    alert("登陆失败：" + msg);
		                                }
		                            }
		                        });
		                    }
		                }
                    </script>
                </div>
                <div id="mark_H" runat="server">
                    
                </div>
		        <div id="downTime" runat="server"></div>
		        <div id="the__uploader" runat="server"></div>
                <div id="dB" runat="server"></div>
	        </div>
        </div>
        <div id="keywords">
	        <div id="guanjian">标签</div>
	        <div id="keys" runat="server">
	        </div>
        </div>
        <div id="stopFlow"></div>
		
        
     </div>
</asp:Content>

